Part Number Hot Search : 
IM821B C18F66 T36GA60B 07523 1N473 FDB6030L LTI406UF MMBTA
Product Description
Full Text Search
 

To Download C164CI-8E Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  semiconductor group 02.99, rel 02 microcontrollers apnote ap1639 in-system programming of c164-8e otp devices siemens C164CI-8E 16-bit microcontrollers provide 64 kbyte otp memory on-chip. this application note gives hints and examples for in-system programming of c164ci otp devices. memory programming and memory uploading is supported by the windows-based memory tools memtool and rom_up. author : peter kliegelh?fer / hl md ae microcontroller application support : additional file ap1639xx.exe available
contents page semiconductor group 2 of 10 ap1639 02.99 c164 otp memory programming 1 otp memory overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2 otp memory configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3 cpu host mode (chm) selection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 4 memtool - the on-chip otp/ flash memory programming tool . . . . . . . . . . . . . . . . 6 4.1 special memtool options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 5 pits, traps and mines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 6 otp programming drivers overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 6.1 program verify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 7 rom_up - the on-chip otp/ flash/ rom memory upload tool. . . . . . . . . . . . . . . . 10 ap1639 apnote - revision history actual revision : 02.99 previous revision : 03/98 page of actual rev. page of prev.rel. 7 7 chapter 5 updated 8 8 chapter 6 updated memtool.exe and programming drivers updated
semiconductor group 3 of 10 ap1639 02.99 c164 otp memory programming 1 otp memory overview the c164ci devices provide 64 kbytes of one-time-programmable ?otp memory on-chip for both instruction code and constant data. the c164ci otp module is a 512 kbit memory organized as 16k double words of 32 bit each. on its cpu interface it presents a fast read access (60ns @ f cpu = 25 mhz) of 32 bit in one machine cycle. read accesses of code and data are possible in any addressing mode, thus realizing the highest cpu performance with fetch and execution of double word instructions in a single instruction cycle. for programming and testing purposes a special interface is realised which directly connects the otp module to an external or internal (cpu) host. programming is performed in steps of 16-bit words, needing typically 100 s per word. special algorithms for over-/ under-programming, with verify operations, are not necessary. the programming voltage is supplied on the ea / vpp pin. unprogrammed otp memory cells contain all 1s. the otp memory can be programmed both in an appropiate programming board (supplier: ertec, sms, data i/o) or in the target system which provides a lot of flexibility. the lower 32 kbytes of the on-chip otp memory of the c164ci can be mapped to either segment 0 (000000 h to 007fff h ) or segment 1 (010000 h to 017fff h ) during the initialization phase to allow external memory to be used for additional system flexibility. the upper 32 kbytes of the on- chip otp memory are assigned to locations 018000 h to 020000 h (figure 1).
semiconductor group 4 of 10 ap1639 02.99 c164 otp memory programming figure 1 c164ci otp memory overview page 7 page 6 page 5 page 4 page 3 page 2 page 1 page 0 segment 0 segment 1 00'0000 h 00'4000 h 00'8000 h 00'c000 h 01'0000 h 01'4000 h 01'8000 h 01'c000 h 02'0000 h sector 1 (32k) c16x memory configuration 64 kbyte otp memory mapping 0 - 32 k 0 - 32 k 00'8000 h 00'0000 h physical otp address 32 - 64 k 00'ffff h 00'0000 h
semiconductor group 5 of 10 ap1639 02.99 c164 otp memory programming 2 otp memory configuration upon reset the default memory configuration of the c164ci is determined by the state of its ea pin. when ea is low the internal otp memory is disabled and the startup code is fetched from external memory. in order to access the on-chip otp memory after booting from external memory the internal otp memory must be enabled via software by setting bit romen in register syscon. the lower 32 kbytes of the otp memory can be mapped to segment 0 or segment 1, controlled by bit roms1 in register syscon. mapping to segment 1 preserves the external memory containing the startup code, while mapping to segment 0 replaces the lower 32 kbytes of the external memory with on- chip otp memory. in this case a valid vector table must be provided. as the on-chip otp memory covers more than segment 0, segmentation should be enabled (by clearing bit sgtdis in register syscon) in order to map the whole internal otp into the address space. whenever the internal memory configuration of the c164ci is changed (mapping, enabling, disabling) the following procedure must be used to ensure correct operation: l configure the internal otp memory as required l execute an inter-segment branch (jmps, calls, rets) l reload all four dpp registers note: register syscon can only be modified before the execution of the einit instruction. note: for detailed informations concerning the handling of internal non-volatile memory please refer to the users manual, chapter ?system programming (handling the internal rom/ pits, traps and mines).
semiconductor group 6 of 10 ap1639 02.99 c164 otp memory programming 3 cpu host mode (chm) selection for in-system programming it is necessary to activate the programming interface which is realized as an xbus peripheral. the c164ci enters chm with port pin p0l.2 low during reset. it is useful to combine this mode with the bootstrap loader mode (see next chapter). 4 memtool - the otp/ flash memory programming tool in-system programming of on-chip otp- and flash memory is supported by the windows-based programming tool ?memtool which is freely available. siemens provides driver updates on the internet; please ask for the current status. memtool is an application example as well as a programming tool for on-chip otp- and flash memory, supporting c161ci-32f, c167cr-16f, c167cs-32f and c163-16f flash devices and C164CI-8E otp devices. thanks to the modular structure memtool is easily expandable for future c16x devices. for an interested user all driver sources are also available (figure 2). along with the drivers come readme.txt files which contain informations about the hardware requirements and latest informations about memtool and each driver. figure 2 memtool c163 flash driver c164 otp driver c167 flash driver driver sources driver sources driver sources
semiconductor group 7 of 10 ap1639 02.99 c164 otp memory programming all software including the programming data is downloaded from a host pc into the internal ram of the microcontroller. the application expects only internal ram, external ram is not required. for otp programming an additional programming voltage (e.g. 11,5 v) has to be applied to pin ea / vpp. please check for the right vpp value in the data sheet. in order to download the application from a pc, a serial link has to be established. the c164ci already provides an asynchronous serial interface that only has to be connected to com1 or com2 of your pc. supposing you are using a phytec c164ci starter kit, you can directly connect its serial connector with the com1/ com2 interface of your pc. note: for getting started two steps are needed: 1.) activate bootstrap loader mode and enter cpu host mode (these modes are activated with port pins p0l.2 and p0l.4 low during reset; simple 8.2k pull down resistors are applicable) 2.) connect the target with the c164ci device to a host pc with a serial cable. 4.1 special memtool options for default memtool expects serial communication via rs232. some drivers also support single- wire transmission (k-line). all drivers which support k-line protocol are marked with kl (see box target/ change/ select controller type). select the desired mode (rs232 or k-line) in box interface / setup interface. in some cases it is also useful to get a log-file of the transmitted data. for log-file generation switch diaglog in the memtool configuration file (memtool.ini/ siemtool.ini) has to be set to 1. the log-file will be closed by leaving memtool. a set box for the log switch is currently not implemented. 5 pits, traps and mines to prevent the controller from beeing damaged, generally main power must be connected before and disconnected after vpp. also the microcontroller has to be in a programming mode (chm or ehm) when applying vpp. in case of in-system programming via memtool the controller must be in chm programming mode. the data transmission speed via k-line (single-wire) can be increased, when the fifo of the used communication port (com1, com2) of the pc is deactivated . the c164ci enters bootstrap mode if pin p0l.4 is sampled low at the end of a hardware reset. in this case the bsl is activated, independent of the selected bus mode; no evaluation of pin ea (external access) in bootstrap loader mode. in cpu host mode (chm) the default setting of bit busact0 in register buscon0 is 1, which means: external bus enabled . in single-chip applications this might could lead to problems with external peripherals, because accesses to the otp programming interface (respectively to the registers opad, opdat, opctrl) can be seen externally . in this case it is necessary to reset bit busact0 before performing the first otp programming interface access. the default setting of
semiconductor group 8 of 10 ap1639 02.99 c164 otp memory programming busact0 in chm is independent of syscon settings. all c164 otp drivers set buscon0 (and therefore busact0) to zero in module load_2. note: since device step ca the setting of bit busact0 in register buscon0 depends in cpu host mode (chm) on the state of pin ea during reset: p0l.2 low (chm) and ea low: busact0 = 1 (external bus enabled) p0l.2 low (chm) and ea high: busact0 = 0 (external bus disabled) 6 otp programming drivers overview several otp programming drivers are available. this is founded on different demands of different applications. the following overview is just a snapshot of the status quo. in the future new versions will be available which will partly replace the current ones. please pay attention to the readme.txt files which come along with the drivers. due to the fact that up to design step bc it not possible to perform otp read accesses in cpu host mode (chm), the success of an otp programming operation can only be verified in normal mode by reading the otp content via rombus (see chapter 6.1). since design step ca read accesses to the otp can be also performed in chm. read accesses (like write accesses) are controlled via the operation control register opctrl. normal data read accesses without the right opctrl setting would deliver dummy zero values 0000 h as long as the controller is in chm. furthermore it is necessary that during verify read accesses vpp level is limited to 5 volt or lower. all c164 otp drivers are properly tested with 9600 baud transmission rate. the readme.txt files in the sub-directories of memtool (memtool/ siemdrv/ c16x...) contain important informations about each driver version: c164ci standard - rs232 - external bus disabled (buscon0=0000h) - no einit - system clock output not enabled - no vpp switching control via port pin c164ci cv_a (customized version a) - rs232 - external bus disabled (buscon0=0000h) - no einit - system clock output enabled - no vpp switching control via port pin
semiconductor group 9 of 10 ap1639 02.99 c164 otp memory programming c164ci phytec starterkit - rs232 - external bus disabled (buscon0=0000h) - einit instruction in modules progp and vefy - system clock output not enabled - vpp switching control via port pin p8.3 c164ci kl cv_b (customized version b) - k-line - external bus disabled (buscon0=0000h) - einit instruction in modules progp and vefy - system clock output not enabled - vpp switching control via port pin p1l.0 c164ci cv_c (customized version c) - rs232 - external bus disabled (buscon0=0000h) - no einit - system clock output enabled - no vpp switching control via port pin 6.1 program verify with current memtool drivers a verification of otp programming can only be performed when the cpu is in normal mode . be aware that the cpu is still in cpu host mode (chm) after programming. all verify attempts will fail as long as the cpu is not in normal mode, regardless of the content of the otp memory. for entering normal mode it is necessary first to disconnect the pull-down resistor at port pin p0l.2 and then to reset the controller (pin p0l.4 has to remain unchanged low for bootstrap loader mode). in module vefy which performs a comparison of the content of the otp memory and the source data bits romen and roms1 of register syscon will be set to 1 in order to enable internal otp memory and to map the lower 32k otp memory to segment 1 (see users manual: memory organization). 7 rom_up - the on-chip otp/ flash/ rom memory upload tool attached there is an windows-based utility rom_up20 which allows to upload the content of otp-, flash- and rom memory (blocks of 32k...256k are currently supported) by using the bootstrap loader. the uploaded data can then be stored into a file (helpful and necessary for a file- compare).
semiconductor group 10 of 10 ap1639 02.99 c164 otp memory programming following a short description of romupv2.exe: self extracting utility program to upload contents of internal flash/ rom memory via bootstrap loader. in combination with a bootstrap loader which is executed from the internal flash, this program allows to upload the content of internal flash/ otp/ rom memory via the serial port and optionally to write the uploaded data into a file. when rom upload v2.0 is invoked, - click on box in the second line on the left side near loader program click on field load... - select file loader.hex (since the example bootstrap loader only accepts 32 bytes (like the integrated bootstrap loader), a second loader (loader.hex) must be used to load larger programs) - click on field load... on the right side of third line - select desired upload program according to desired/ maximum memory size of your controller (64kb.h67 will read entire memory of C164CI-8E, 32kb.h67 will read first 32 kbyte of memory) note: first 32kbyte (0000h...7fffh) of memory is always mapped to segment 1 (10000h...17fffh) by file loader.hex in order to have linear addresses.


▲Up To Search▲   

 
Price & Availability of C164CI-8E

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X